<link rel="stylesheet" type="text/css" href="public/css/style.css" /><?php
require_once './model/works.php';
$md_works = new Works();
$id_work = $_GET['id'];

//Lay cong viec tuong ung voi id tren
$params = array(
    'listId_works' => $id_work
);
$work = $md_works->select($params);
?>
<div class="container">
    <?php include 'template/header.php'; ?>
    <table method="post"      enctype="multipart/form-data">
        <tr>
            <th>ten cong viec</th>
            <td><?php echo $work[0]["name"] ?></td>
        </tr>
        <tr>
            <th>Ngay dang</th>
            <td><?php $mydate = getdate($work[0]['posted']); ?> 
                <?php echo "$mydate[mday] $mydate[month], $mydate[year]"; ?></td>
        </tr>
        <tr>
            <th>Lam viec tai</th>
            <td><?php echo $work[0]["location"] ?></td>
        </tr>
        <tr>
            <th>Ten cong ty</th>
            <td><?php echo $work[0]["company_name"] ?></td>
        </tr>
        <tr>
            <th>Dia chi</th>
            <td><?php echo $work[0]["company_address"] ?></td>
        </tr>
        <tr>    
            <th>mo ta cong viec</th>
            <td><?php echo $work[0]["description"] ?></td>
        </tr>
        <tr>
            <th>Dieu kien</th>
            <td><?php echo $work[0]["experience_requirements"] ?></td>
        </tr>
        <tr>
            <th>Lien he</th>
            <td><?php echo $work[0]["company_profile"] ?></td>
        </tr>
        <tr>
            <th>Hinh anh</th>
            <td><img src="<?php echo $work[0]['image'] ?>" width="100px" height="100px"></td>
        </tr>
    </table>
</div>